<html>
<head>
<title>ZFS Message ID: ZFS-8000-4J</title>
</head>
<body>
<!--
 Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms.
-->
<!--
 CDDL HEADER START

 The contents of this file are subject to the terms of the
 Common Development and Distribution License (the "License").
 You may not use this file except in compliance with the License.

 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 or http://www.opensolaris.org/os/licensing.
 See the License for the specific language governing permissions
 and limitations under the License.

 When distributing Covered Code, include this CDDL HEADER in each
 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 If applicable, add the following below this CDDL HEADER, with the
 fields enclosed by brackets "[]" replaced with your own identifying
 information: Portions Copyright [yyyy] [name of copyright owner]

 CDDL HEADER END
-->
<!-- start: templates/success -->
<!-- ident	"@(#)success	1.4	07/03/02 SMI" -->
Article for Message ID:&nbsp;&nbsp; <font size="+1"><tt><b>ZFS-8000-4J</b></tt></font>
<br><br>
<hr>
<br><br>
<!-- end: templates/success -->
<!-- start: article -->
<!-- code: ZFS-8000-4J -->
<!-- keys: ereport.fs.zfs.device.corrupt_label_r -->
<table width="80%"><tr><td>
<b>Corrupted device label in a replicated configuration</b>
<p>
<dl>
<dt><p><b>Type</b>
<dd>Error
<dt><p><b>Severity</b>
<dd>Major
<dt><p><b>Description</b>
<dd>A device could not be opened due to a missing or invalid
	    device label.
<dt><p><b>Automated Response</b>
<dd>A hot spare will be activated if available.
<dt><p><b>Impact</b>
<dd>The pool is no longer providing the configured level of
	    replication.
<dt><p><b>Suggested Action for System Administrator</b>
<dd>
<h4>For an active pool</h4>

<p>If this error was encountered while running 'zpool import', please see
the section below.  Otherwise, run 'zpool status -x' to determine which pool
has experienced a failure:</p>


<pre>
# zpool status -x
  pool: test
 state: DEGRADED
status: One or more devices could not be used because the label is missing or
        invalid.  Sufficient replicas exist for the pool to continue
        functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: https://zfsonlinux.com/msg/ZFS-8000-4J
 scrub: none requested
config:

        NAME                  STATE     READ WRITE CKSUM
        test                  DEGRADED     0     0     0
          mirror              DEGRADED     0     0     0
            c0t0d0            ONLINE       0     0     0
<font color='red'>            c0t0d1            FAULTED      0     0     0  corrupted data</font>

errors: No known data errors
</pre>

<p>If the device has been temporarily detached from the system, attach the
device to the system and run 'zpool status' again.  The pool should
automatically detect the newly attached device and resume functioning.</p>

<p>If the device is no longer available, it can be replaced using 'zpool
replace':</p>

<pre>
# zpool replace test c0t0d1 c0t0d2
</pre>

<p>If the device has been replaced by another disk in the same physical
slot, then the device can be replaced using a single argument to the 'zpool
replace' command:</p>

<pre>
# zpool replace test c0t0d1
</pre>

<p>ZFS will begin migrating data to the new device as soon as the replace
is issued.  Once the resilvering completes, the original device (if different
from the replacement) will be removed, and the pool will be restored to the
ONLINE state.<p>

<h4>For an exported pool</h4>

<p>If this error is encountered while running 'zpool import', the pool can
be still be imported despite the failure:</p>

<pre>
# zpool import
  pool: test
    id: 5187963178597328409
 state: DEGRADED
status: One or more devices contains corrupted data.  The fault tolerance of
	the pool may be compromised if imported.
action: The pool can be imported using its name or numeric identifier.
   see: https://zfsonlinux.com/msg/ZFS-8000-4J
config:

        test              DEGRADED
          mirror          DEGRADED
            c0t0d0        ONLINE
<font color='red'>            c0t0d1        FAULTED   corrupted data</font>
</pre>

<p>To import the pool, run 'zpool import':<p>

<pre>
# zpool import test
</pre>

<p>Once the pool has been imported, the damaged device can be replaced
according to the above procedure.</p>
	
<dt><p><b>Details</b>
<dd>The Message ID: <tt>ZFS-8000-4J</tt> indicates a
	    device which was unable to be opened by the ZFS subsystem.
</dl>
</td></tr></table>
<!-- end: article -->
</body>
</html>
